Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.

Comments

Implement PostgreSQL support#7

Merged
olibf merged 2 commits intomainfrom
feature/support-for-postgresql
Dec 19, 2025
Merged

Implement PostgreSQL support#7
olibf merged 2 commits intomainfrom
feature/support-for-postgresql

Conversation

@olibf
Copy link
Owner

@olibf olibf commented Dec 19, 2025

Pull Request

Description

add PostgreSqlSchemaExtractor, update SchemaExportService to use factory pattern, and enhance CLI with database type detection.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Changes Made

  • Added PostgreSQL support

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have updated the CHANGELOG.md with my changes
  • New and existing unit tests pass locally with my changes
  • I have checked my code follows hexagonal architecture principles
  • I have ensured proper separation between domain, application, and infrastructure layers

Note

Adds PostgreSQL schema extraction, refactors to an extractor factory, and updates the CLI to select or auto-detect database type.

  • Core/Infrastructure:
    • PostgreSQL support: Implement PostgreSqlSchemaExtractor with Npgsql; add Npgsql dependency.
    • Extractor factory: Introduce SchemaExtractorFactory to instantiate ISchemaExtractor per DatabaseType.
    • Domain: Add DatabaseType enum (SqlServer, PostgreSql).
  • Application:
    • SchemaExportService refactored to use factory (Func<DatabaseType, ISchemaExtractor>); improved logging includes DatabaseType.
    • SchemaExportRequest updated to include DatabaseType.
  • CLI:
    • Add --database-type (-d) option; auto-detect database type from connection string; print detected type and app version.
    • DI updated to register extractor factory; help text and examples expanded for PostgreSQL.
  • Docs:
    • Update README.md and CHANGELOG.md for PostgreSQL support, cross-database comparison, and new CLI options.

Written by Cursor Bugbot for commit 11b43f2. This will update automatically on new commits. Configure here.

Oliver Brandford added 2 commits December 19, 2025 14:24
…chemaExportService to use factory pattern, and enhance CLI with database type detection.
…tic and update CLI to use the new static method.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

services.AddSingleton<Func<DatabaseType, ISchemaExtractor>>(serviceProvider =>
{
var factory = new SchemaExtractorFactory();
return (databaseType) => SchemaExtractorFactory.CreateExtractor(databaseType);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Unused factory instance created but never referenced

The variable factory is instantiated with new SchemaExtractorFactory() on line 67 but is never used. The next line calls SchemaExtractorFactory.CreateExtractor(databaseType) as a static method, meaning the instance is completely unnecessary. This appears to be leftover code from when the method was possibly an instance method, and the instantiation was not removed when it was changed to static.

Fix in Cursor Fix in Web

@olibf olibf merged commit ea7604e into main Dec 19, 2025
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant